<?php
Route::group(['prefix' => 'ad', 'namespace' => 'Ad', 'as' => 'ad.'], function () {
    //广告栏目
    Route::group(['prefix'=>'advert'],function (){
        Route::delete('delete_all','AdvertController@delete_all')->name('advert.delete_all');
        Route::patch('sort_order','AdvertController@sort_order')->name('advert.sort_order');
        Route::get('trash','AdvertController@trash')->name('advert.trash');
        Route::delete('{advert}/delete_one','AdvertController@delete_one')->name('advert.delete_one');
        Route::delete('delete','AdvertController@delete')->name('advert.delete');
        Route::patch('restore_one','AdvertController@restore_one')->name('advert.restore_one');
        Route::patch('restore_all','AdvertController@restore_all')->name('advert.restore_all');
    });
    Route::resource('advert', 'AdvertController');
    //分类管理
    Route::group(['prefix' => 'category'], function () {
        Route::delete('delete_all','CategoryController@delete_all')->name('category.delete_all');
        Route::patch('change_attr','CategoryController@change_attr')->name('category.change_attr');
        Route::patch('sort_order','CategoryController@sort_order')->name('category.sort_order');
    });
    Route::resource('category', 'CategoryController');

});